package models_sports

import (
	"fmt"
	"longmen/server/pkg/db/mysql/models"
)

type MatchTempSchedule struct {
	Id                int    `gorm:"primaryKey;comment:ID"`
	MatchId           int    `gorm:"column:match_id;type:int(11);uniqueIndex:idx_match_id,sort:desc; comment:赛程ID"`
	MatchTime         int64  `gorm:"column:match_time;type:bigint(20); comment:赛事时间"`
	SportId           int    `gorm:"column:sport_id;type:int(20); comment:1足球 2篮球"`
	Comp              string `gorm:"type:varchar(255); comment:联赛名"`
	CompShortZh       string `gorm:"type:varchar(255); comment:联赛名"`
	CompShortEn       string `gorm:"type:varchar(255); comment:联赛名(英文)"`
	CompLogo          string `gorm:"type:varchar(255); comment:联赛logo"`
	Home              string `gorm:"type:varchar(255); comment:主队名"`
	HomeLogo          string `gorm:"type:varchar(255); comment:主队logo"`
	Away              string `gorm:"type:varchar(255); comment:客队名"`
	AwayLogo          string `gorm:"type:varchar(255); comment:客队logo"`
	HomeScore         uint32 `gorm:"type:int(11); comment:主队得分"`
	AwayScore         uint32 `gorm:"type:int(11); comment:客队得分"`
	TimePlayed        uint32 `gorm:"type:int(11); comment:进行时间"`
	MatchStatus       uint32 `gorm:"type:int(11); comment:比赛状态, 1-进行,2-未开赛,3-完场"`
	MatchDetailStatus string `gorm:"type:varchar(255); comment:比赛具体状态"`
	RawMatchStatus    uint32 `gorm:"type:varchar(255); comment:原始状态"`
	AwayEn            string `gorm:"type:varchar(255); comment:客队名(英文)"`
	HomeEn            string `gorm:"type:varchar(255); comment:主队名(英文)"`
}

type LeagueName struct {
	CompShortZh string `gorm:"type:varchar(255); comment:联赛名"`
	CompShortEn string `gorm:"type:varchar(255); comment:联赛名(英文)"`
	Comp        string `gorm:"type:varchar(255); comment:联赛名"`
}

func (MatchTempSchedule) TableName() string {
	return fmt.Sprintf("%smatches_schedule", models.Prefix)
}
